package com.gong.DesignPattern.VisitorPattern;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/7/8 0008 9:05
 */
public class Egg {
    private Cpu cpu;
    private Ram ram;

    public Egg(Cpu cpu, Ram ram) {
        this.cpu = cpu;
        this.ram = ram;
    }

    public void run(){
        System.out.println(cpu.commend);
        System.out.println(ram.commend);
    }
}
